package com.example.prom.dangwen.y2023.thread;

import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        // 输入天数和股票报价
//        System.out.print("请输入天数：");
        int n = scanner.nextInt();
        int[] prices = new int[n];
//        System.out.print("请输入股票报价（用空格分隔）：");
        for (int i = 0; i < n; i++) {
            prices[i] = scanner.nextInt();
        }

        // 计算最长连续上涨天数
        int maxLength = 0;
        int currentLength = 0;
        for (int i = 1; i < n; i++) {
            if (prices[i] > prices[i - 1]) {
                currentLength++;
            } else {
                maxLength = Math.max(maxLength, currentLength);
                currentLength = 0;
            }
        }
        maxLength = Math.max(maxLength, currentLength); // 最后一段连续上涨的长度可能是最大的

        System.out.println(maxLength + 1); // 上涨天数等于连续上涨天数加1

        scanner.close();
    }
}
